package com.n9.qqonline.sales.vo;

import com.n9.qqonline.sales.entity.ReadStatus;
import com.n9.qqonline.sales.product.Patent;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * @author ice
 * @since 2019/3/8 14:44
 */
public class BuyMsgVo {
    private Integer id;
    private String day;
    private ReadStatus readStatus;
    private String sign;
    private String notes;
    private String readTime;

    private Long recvQQUin;
    private Long recvGroupCode;
    private String recvGroupName;
    private String recvTime;
    private Long sendQQUin;
    private String sendNick;
    private String content;

    private List<Patent> patents = new ArrayList<>();

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDay() {
        return day;
    }

    public void setDay(String day) {
        this.day = day;
    }

    public ReadStatus getReadStatus() {
        return readStatus;
    }

    public void setReadStatus(ReadStatus readStatus) {
        this.readStatus = readStatus;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    public Long getRecvQQUin() {
        return recvQQUin;
    }

    public void setRecvQQUin(Long recvQQUin) {
        this.recvQQUin = recvQQUin;
    }

    public Long getRecvGroupCode() {
        return recvGroupCode;
    }

    public void setRecvGroupCode(Long recvGroupCode) {
        this.recvGroupCode = recvGroupCode;
    }

    public String getRecvGroupName() {
        return recvGroupName;
    }

    public void setRecvGroupName(String recvGroupName) {
        this.recvGroupName = recvGroupName;
    }

    public String getRecvTime() {
        return recvTime;
    }

    public void setRecvTime(String recvTime) {
        this.recvTime = recvTime;
    }

    public Long getSendQQUin() {
        return sendQQUin;
    }

    public void setSendQQUin(Long sendQQUin) {
        this.sendQQUin = sendQQUin;
    }

    public String getSendNick() {
        return sendNick;
    }

    public void setSendNick(String sendNick) {
        this.sendNick = sendNick;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getReadTime() {
        return readTime;
    }

    public void setReadTime(String readTime) {
        this.readTime = readTime;
    }

    public List<Patent> getPatents() {
        return patents;
    }

    public void setPatents(List<Patent> patents) {
        this.patents = patents;
    }

    public boolean isExistPatent(Patent patent) {
        for (Patent p : patents) {
            if (Objects.equals(p, patent)) {
                return true;
            }
        }
        return false;
    }

}
